<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * Router Class สำหรับค้นหา controller , method & vars จาก url ที่เรียกเข้ามา
 *
 * @author	Nawattapon Yoskamtorn
 * @link	http://www.devlism.com
 */

class DL_Lang
{
    private $lang = array();
    
    function __construct()
    {
	
    }
    
    function __destruct()
    {
	
    }
    
    /**
    * get controller folder & file (method)
    * @access	private
    * @return	array controller (folder,file,[method])
    */
    function line($str=NULL)
    {
	if($str!=NULL){
	    if(array_key_exists($str,$this->lang)){
		return $this->lang[$str];
	    }else{
		return $str;
	    }
	}else{
	    return '';
	}
    }
    
    /**
    * check uri from $route in config/route.php
    * @access	private
    * @return	array controller (folder,file,[method])
    */
    function set_lang($lang=array()) // ตรวจสอบ url กับ route ว่าตรงหรือไม่
    {
	//foreach($lang as $kay=>$val){
	//    $this->lang[$kay] = $val;
	//}
	
	$this->lang = $lang;
    }
}

/* End of file DL_Lang.class.php */
/* Location: ./core/DL_Lang.class.php */